package com.blog.wu.myblog.xxljob.handler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.log.XxlJobLogger;

import java.util.concurrent.TimeUnit;

/**
 * @Author wuyanshen
 * @Date 2018-12-17 5:36 PM
 * @Discription 描述
 */
public class DemoGlueJobHandler extends IJobHandler {

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("我的任务开始执行了");
        TimeUnit.SECONDS.sleep(15);
        XxlJobLogger.log("XXL-JOB, 任务执行结束");
        return ReturnT.SUCCESS;
    }

}
